#ifndef __AP3216C_H
#define __AP3216C_H

#include "../iic/bsp_iic.h"

#define AP3216_WRITE_ADDRESS 0x3c

#define AP3216_READ_ADDRESS 0x3d // 0写1读
#define AP3216_SYSTEM_CONFIGRATION_ADDRESS 0x00

#define AP3216_PS_CONFIGRATION_ADDRESS 0x20
#define AP3216_PS_DATA_LOW_ADDRESS 0x0E
#define AP3216_PS_DATA_HIGH_ADDRESS 0x0F

#define AP3216_ALS_CONFIGRATION_ADDRESS 0x10
#define AP3216_ALS_DATA_LOW_ADDRESS 0x0C
#define AP3216_ALS_DATA_HIGH_ADDRESS 0x0D

extern void AP3216_Write_Data(uint_fast8_t registerAddr, uint_fast8_t val);
extern uint_fast8_t AP3216_Read_Data(uint_fast8_t registerAddr);
extern void AP3216_Config();
extern uint_fast16_t AP3216_Read_ALS();
extern uint_fast16_t AP3216_Read_PS();

#endif
